#pragma once
#include <hiredis/hiredis.h>
#include <Common/Common.h>
#include "TypeDef.h"

class CRedisReply
{
public:
	CRedisReply();
	~CRedisReply();

public:	
    Redis::ReplyType            GetReplyType();
	string			            GetReplyErr();
	Bool				        GetReplyBool();
	string			            GetReplyString();
	UInt64				        GetReplyInteger();
	list<string>                GetReplyList();
	map<string, string>         GetReplyHash();

	void                        SetReplyType(Redis::ReplyType type);
	void                        Clear();

	void                        SetReplyErr(const string& strErrReply);
	void                        SetReplyBool(const Bool& bBoolReply);
	void                        SetReplyString(const string& strStringReply);
	void                        SetReplyInteger(const Int64 lIntegerReply);
	void                        SetReplyList(redisReply* pReply);
	void                        SetReplyHash(redisReply* pReply);

private:
    Redis::ReplyType			        m_eReplyType;
	string					            m_strReplyErr;
	Bool				                m_boolReplyBool;
	string					            m_strReplyString;
	UInt64					            m_lReplyInterger;
	list<string>			            m_lstReplyList;
	map<string, string>                 m_mapReplyHash;
};

